/**
 * 加载后台运行时支持的css样式和js脚本 by 姜友瑶 2015-12-1
 */
function getRootPath() {
	var curWwwPath = window.document.location.href;

	var pathName = window.document.location.pathname;

	var url = curWwwPath.substring(0, curWwwPath.indexOf(pathName));
	if (url.indexOf('localhost')>0) {
		return url + pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
	}
	if (url.split(".").length == 4) {
		return url + pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
	}
	return url;
}

/** 全局路径，代表当前网站的根URL */
var basePath = getRootPath();

/*******************************************************************************
 * base style and script not change the file order
 ******************************************************************************/
document
		.write(

		'<link href="'
				+ basePath
				+ '/resource/plugin/layer_mobile/layer.css" rel="stylesheet"></link>'
				+ '<link href="'
				+ basePath
				+ '/resource/plugin/Validform_v5.3.2/style.css" rel="stylesheet"></link>'

				+ '	<link rel="stylesheet" href="'
				+ basePath
				+ '/resource/plugin/amazingUI/css/amazeui.min.css">'

				+ '<script type="text/javascript" src="'
				+ basePath
				+ '/resource/plugin/amazingUI/js/amazeui.min.js" ></script>'

				+ '<script type="text/javascript" src="'
				+ basePath
				+ '/resource/plugin/Validform_v5.3.2/Validform_v5.3.2.js"></script>'
				+ '<link href="' + basePath
				+ '/resource/weixin/css/common.css" rel="stylesheet"></link>'

				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/plugin/layer_mobile/layer.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/jquery.query.js"  ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/AjaxProxyForMobile.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/MTools.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/MUI.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/MForm.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/MValidform.js" ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/Pagination.js" ></script>'
				+ '<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"  ></script>'
				+ '<script type="text/javascript" src="' + basePath
				+ '/resource/js/systools/MGrid.js" ></script>');
